<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<link rel="apple-touch-icon" href="${contextPath}images/mobile/apple-touch-icon.png" />
	<link rel="apple-touch-startup-image" href="${contextPath}images/mobile/apple-touch-startup-image-320x460.png" />
	<meta name="author" content="FamousThemes" />
	<meta name="description" content="GoMobile - A next generation web app theme" />
	<meta name="keywords" content="mobile web app, mobile template, mobile design, mobile app design, mobile app theme, mobile wordpress theme, my mobile app" />
	
	<title>OA 办公自动化平台</title>
	<link type="text/css" rel="stylesheet" href="${contextPath}css/mobile/wtf-forms.css" />
	<link type="text/css" rel="stylesheet" href="${contextPath}css/mobile/docs.css" />
	<link type="text/css" rel="stylesheet" href="${contextPath}css/mobile/style.css" />
	<link type="text/css" rel="stylesheet" href="${contextPath}css/mobile/colors/green/green.css" />
	<link type="text/css" rel="stylesheet" href="${contextPath}css/mobile/idangerous.swiper.css" />
	<link type="text/css" rel="stylesheet" href="${contextPath}css/mobile/swipebox.css" />
	<link type="text/css" rel="stylesheet" href="${contextPath}css/mobile/datePicker/css/mobiscroll.custom-2.5.0.min.css" />
<!-- 	<link href='http://fonts.googleapis.com/css?family=Lato:300' rel='stylesheet' type='text/css' /> -->
	
	<script type="text/javascript" src="${contextPath}js/mobile/jquery-1.10.1.min.js"></script>
	
	<style>
		.show{display:black;}
		.hide{display:none;}
	</style>
</head>
<body>
	<div id="header">
		<div class="gohome radius20"><a href="#"><img src="${contextPath}images/mobile/icons/home.png" alt="" title="" /></a></div> 
		<div class="gomenu radius20" style=" background:#fff;" onclick="javascript:loginOut();"><a href="#"><img src="${contextPath}images/mobile/icons/outgoing.png" alt="" title="" /></a></div>
		<div class="trigger goinput">
			<span>查询条件/添加</span>
		</div>
		<div class="toggle_container">
			<div class="tcb" id="page_content_init">
			</div>
		</div>
	</div>
	<div class="swiper-container swiper-parent">
		<div class="swiper-wrapper">

<!-- 			Menu page -->
			<div class="swiper-slide sliderbg_menu">
				<div class="swiper-container swiper-nested">
					<div class="swiper-wrapper">
						<div class="swiper-slide">
							<div class="slide-inner">
								<div class="logo">
									<a href="#"><img src="${contextPath}images/mobile/logo.png"
										alt="" title="" border="0" /> </a>
								</div>
								<div class="menu">
									<ul>
									<#list list as sys>
									<#list sys.moduleList as mo>
									<#list mo.menuList as me>
										<#if (me.ms && 'admin@ish365.com' == cu_email) || (me.ms && cu_isManager && (orgHandleMap[me.code])??) || (me.ms && (handleMap[me.code])?? && (orgHandleMap[me.code])??)>
										<li>
											<a href="javascript: void(0);" onclick="javascript: sys_load_handle('${(me.code)!''}');">
												<img src="${contextPath}images/mobile/icons/about.png" alt="" title="" />
												<span>${(me.name)!''}</span>
											</a>
										</li>
										</#if>
									</#list>
									</#list>
									</#list>
									</ul>
									<div class="clearfix"></div>
								</div>
							</div>
						</div>
					</div>
					<div class="swiper-scrollbar"></div>
				</div>
			</div>
	
<!-- 			Page content -->
			<div class="swiper-slide sliderbg">
				<div class="swiper-container swiper-nested1">
					<div class="swiper-wrapper">
						<div class="swiper-slide">
							<div class="slide-inner">
<!-- 								Page content -->
								<div class="pages_container">
								<div id="page_content"></div>
								
								
								<div id="page_div">
									<div id="loadMore" class="loadMore radius8" onclick="javascript:loadMore();">加载更多...</div>
									<form id="pageForm">
										<input type="hidden" class="page" name="page" value="1"/>
									</form>
								</div>
								
								<div class="clearfix"></div>
								<div class="scrolltop radius20">
									<a href="javascript:;" onclick="javascript:swiperNested1.swipeTo(0);" class="scrolltop1">
										<img src="${contextPath}images/mobile/icons/top.png" alt="回到顶部" title="回到顶部" /> 
									</a>
								</div>
								</div>
								
							</div>
						</div>
					</div>
				</div>
				<div class="swiper-scrollbar1"></div>
			</div>
		</div>



	</div>
	<div class="pagination"></div>
</body>
	<script type="text/javascript" src="${contextPath}js/mobile/jquery.swipebox.js"></script>
	<script type="text/javascript" src="${contextPath}js/mobile/idangerous.swiper-2.1.min.js"></script>
	<script type="text/javascript" src="${contextPath}js/mobile/idangerous.swiper.scrollbar-2.1.js"></script>
	<script type="text/javascript" src="${contextPath}js/mobile/jquery.tabify.js"></script>
	<script type="text/javascript" src="${contextPath}js/mobile/jquery.fitvids.js"></script>
	<script type="text/javascript" src="${contextPath}js/mobile/code.js"></script>
	<script type="text/javascript" src="${contextPath}js/mobile/load.js"></script>
	<script type="text/javascript" src="${contextPath}js/mobile/mo_basic.js"></script>
	<script type="text/javascript" src="${contextPath}js/mobile/mobiscroll.custom-2.5.0.min.js"></script>

<script type="text/javascript">
	$(function() {
		showHidden();
	});

	var is_onload = false;
	
	var sys_context_path = '${contextPath}';
	
	function sys_load_handle(mcode, btn) {
		swiperNested1.swipeTo(0);	// 解决拉到底部时点击添加按钮不出编辑页面的问题
		if (is_onload)
			return false;
		
		var handel_content = $('#page_content_init');
		var url = create_url(mcode);
		
		is_onload = true;
		
		$.ajax({type:'POST', url:url, cache:false,
			success : function(result) {
				is_onload = false;
				$('#page_content').empty();
				swiperParent.swipeTo(1);		// 切换出页面
				handel_content.html(result);
				$('#page_div').show();
				$('#pageForm').find('input.page').val(2);
			},
			error : function(event, XMLHttpRequest, ajaxOptions, thrownError) {
				alert('服务器错误！');
				is_onload = false;
			}
		});
	}
	// 加载编辑页面
	function sys_load_handle_edit(mcode, btn) {
		swiperNested1.swipeTo(0);	// 解决拉到底部时点击添加按钮不出编辑页面的问题
		if (is_onload)
			return;
		
		var page_content = $('#page_content');
		var url = create_url(mcode);
		
		is_onload = true;
		
		$.ajax({type:'POST', url:url, cache:false,
			success : function(result) {
				is_onload = false;
				page_content.html(result);
				$('#page_div').hide();
				$('.toggle_container').hide();
				swiperNested1.reInit();			// 刷新样式计算
			},
			error : function(event, XMLHttpRequest, ajaxOptions, thrownError) {
				alert('服务器错误！');
				is_onload = false;
			}
		});
	}
	
	// 退出
	function loginOut() {
		if (confirm("确定要退出系统吗？"))
			window.location.href = sys_context_path + "bsLoginout.html";
	}
	
	// 分页方法调用
	function loadMore() {
		is_onload = true;
		var mcode = $('#page_content').find('input.pageurl').first().val();
		var handel_content = $('#page_content');
		var parm = $('#pageForm').serialize();
		var url = create_url(mcode);
		
		$.ajax({type:'POST', url:url, data:parm,
			success : function(result, state, request) {
				is_onload = false;
				handel_content.append(result);
				var p = result.indexOf('-[]-');
				var isdata = parseInt(result.substring(p + 4, p + 5));
				if (isdata == 0) {
					alert('没有数据了');
					return false;
				}
				swiperNested1.reInit();			// 刷新样式计算
				var p = parseInt($('#pageForm').find('input.page').val());
				$('#pageForm').find('input.page').val(++p);
			},
			error : function(event, XMLHttpRequest, ajaxOptions, thrownError) {
				alert('服务器错误！');
				is_onload = false;
			}
		});
	}
	</script>
</html>